home *** CD-ROM | disk | FTP | other *** search
-
-
-
- iiiimmmmppppRRRReeeeaaaaddddRRRRoooowwww((((3333)))) IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo iiiimmmmppppRRRReeeeaaaaddddRRRRoooowwww((((3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- impReadRow, impReadRowB, impWriteRow, impWriteRowB - read/write SGI Image
- Format files
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<iiiimmmmpppp....hhhh>>>>
-
- iiiinnnntttt iiiimmmmppppRRRReeeeaaaaddddRRRRoooowwww((((IIIIMMMMPPPPIIIImmmmaaaaggggeeee ****iiiimmmmaaaaggggeeee,,,, sssshhhhoooorrrrtttt ****bbbbuuuuffffffffeeeerrrr,,,,
- uuuusssshhhhoooorrrrtttt____tttt rrrroooowwww,,,, uuuusssshhhhoooorrrrtttt____tttt cccchhhhaaaannnnnnnneeeellll))));;;;
-
- iiiinnnntttt iiiimmmmppppRRRReeeeaaaaddddRRRRoooowwwwBBBB((((IIIIMMMMPPPPIIIImmmmaaaaggggeeee ****iiiimmmmaaaaggggeeee,,,, uuuucccchhhhaaaarrrr____tttt ****bbbbuuuuffffffffeeeerrrr,,,,
- uuuusssshhhhoooorrrrtttt____tttt rrrroooowwww,,,, uuuusssshhhhoooorrrrtttt____tttt cccchhhhaaaannnnnnnneeeellll))));;;;
-
- iiiinnnntttt iiiimmmmppppWWWWrrrriiiitttteeeeRRRRoooowwww((((IIIIMMMMPPPPIIIImmmmaaaaggggeeee ****iiiimmmmaaaaggggeeee,,,, sssshhhhoooorrrrtttt ****bbbbuuuuffffffffeeeerrrr,,,,
- uuuusssshhhhoooorrrrtttt____tttt rrrroooowwww,,,, uuuusssshhhhoooorrrrtttt____tttt cccchhhhaaaannnnnnnneeeellll))));;;;
-
- iiiinnnntttt iiiimmmmppppWWWWrrrriiiitttteeeeRRRRoooowwwwBBBB((((IIIIMMMMPPPPIIIImmmmaaaaggggeeee ****iiiimmmmaaaaggggeeee,,,, uuuucccchhhhaaaarrrr____tttt ****bbbbuuuuffffffffeeeerrrr,,,,
- uuuusssshhhhoooorrrrtttt____tttt rrrroooowwww,,,, uuuusssshhhhoooorrrrtttt____tttt cccchhhhaaaannnnnnnneeeellll))));;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _i_m_p_R_e_a_d_R_o_w and _i_m_p_R_e_a_d_R_o_w_B each read a row of image data from the
- specified channel of an SGI Image Format file. _i_m_p_R_e_a_d_R_o_w stores the row
- data in an array of _s_h_o_r_t integers and therefore can read image data that
- is either one or two bytes per pixel per channel in width. _i_m_p_R_e_a_d_R_o_w_B
- stores the data in a character array and can only handle image data that
- is one byte per pixel per channel wide. If _i_m_p_R_e_a_d_R_o_w_B is called to read
- image data that is two bytes per pixel per channel, an error condition is
- reported.
-
- _i_m_p_W_r_i_t_e_R_o_w and _i_m_p_W_r_i_t_e_R_o_w_B each write a row of image data to the
- specified channel of an SGI Image file. _i_m_p_W_r_i_t_e_R_o_w writes one or two
- byte per pixel per channel image row data. _i_m_p_W_r_i_t_e_R_o_w_B writes only one
- byte per pixel data. It is an error to use _i_m_p_W_r_i_t_e_R_o_w_B to write to
- images that expect two byte per pixel per channel data.
-
- The functions take the following parameters.
-
- _i_m_a_g_e Pointer to an _I_M_P_I_m_a_g_e structure returned by a call to
- _i_m_p_O_p_e_n or _i_m_p_O_p_e_n_F_d.
-
- _b_u_f_f_e_r Caller allocated buffer containing the data to write to or
- to be filled with the data read from the image. The amount
- of storage allocated for the buffer should be
- impXSize(image) * sizeof(short) if _i_m_p_R_e_a_d_R_o_w or
- _i_m_p_W_r_i_t_e_R_o_w functions are used and impXSize(image) _i_f
- _i_m_p_R_e_a_d_R_o_w_B _o_r _i_m_p_W_r_i_t_e_R_o_w_B _a_r_e _u_s_e_d.
-
- _r_o_w The image row to read. Rows are numbered from 0 through
- impYSize(image) - 1.
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- iiiimmmmppppRRRReeeeaaaaddddRRRRoooowwww((((3333)))) IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo iiiimmmmppppRRRReeeeaaaaddddRRRRoooowwww((((3333))))
-
-
-
- _c_h_a_n_n_e_l The image channel to read. Channels are numbered from 0
- through impNumChannels(image) - 1.
-
- RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
- If execution was successful, all functions return the number of pixels
- (not bytes) read or written. If an execution error occurred, -1 is
- returned and _I_M_P_e_r_r_n_o is set.
-
- EEEEXXXXEEEECCCCUUUUTTTTIIIIOOOONNNN EEEERRRRRRRROOOORRRR CCCCOOOODDDDEEEESSSS
- In addition to the system error codes defined in _e_r_r_n_o._h, the following
- _l_i_b_i_m_p specific error codes may be returned.
-
- _i_m_p_W_r_i_t_e_R_o_w and _i_m_p_W_r_i_t_e_R_o_w_B will fail under the following circumstances.
-
- IMP_ERR_WRITEFLAG Attempt to write to an image file not opened for
- writing.
-
- IMP_ERR_BADBPP Unsupported bytes per pixel value. Refer to
- _i_m_p._h for supported BPP values.
-
- IMP_ERR_BADIMAGE Unrecognized image type. Refer to _i_m_p._h for
- supported image types.
-
- IMP_ERR_SHORTWRITE A complete row of data could not be written.
-
- _i_m_p_R_e_a_d_R_o_w and _i_m_p_R_e_a_d_R_o_w_B will fail under the following circumstances.
-
- IMP_ERR_READFLAG Attempt to read from an image file not opened
- for reading.
-
- IMP_ERR_BADBPP Unsupported bytes per pixel value. Refer to
- _i_m_p._h for supported BPP values.
-
- IMP_ERR_BADIMAGE Unrecognized image type. Refer to _i_m_p._h for
- supported image types.
-
- IMP_ERR_SHORTREAD The amount of data read was less than the amount
- expected based on the image size.
-
- NNNNOOOOTTTTEEEE
- It is the caller's responsibility to allocate enough buffer storage for
- image row data.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- libimp(3), impOpen(3)
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-